package top.mybatisx.mpquery.config;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import top.mybatisx.mpquery.service.MPQueryxService;

@Configuration
public class MybatisPlusQueryServiceAutoConfiguration {

    @Autowired
    private SqlSessionFactory sqlSessionFactory;


    @Bean
    public MPQueryxService mpQueryxService() {
        MPQueryxService mpQueryxService = new MPQueryxService();
        mpQueryxService.setSqlSessionFactory(sqlSessionFactory);
        return mpQueryxService;
    }
}
